package com.fox.toolcallingdemo.tool.weather.method;


import org.springframework.ai.tool.annotation.Tool;
import org.springframework.stereotype.Component;

@Component
public class WeatherToolImpl implements WeatherTool {
    @Override
    @Tool(description = "获取指定城市的天气信息。")
    public String getWeather(String city) {
        return "The weather in " + city + " is snowing.";
    }
    //通过description来让大模型判断调用什么方法
    @Tool(description = "获取指定姓名的身高。")
    public String getHeight(String name) {
        return  name   + " is 180cm.";
    }
}
